package com.news.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author:weiming
 * @Date:2021/3/26
 *
 * 文章实体
 */
public class Article implements Serializable {
    /**
     * 文章id
     */
    private Integer id;
    /**
     * 标题
     */
    private String title;
    /**
     * 作者
     */
    private String author;
    /**
     * 是否删除 0->未删除,1->已删除
     */
    private Integer isDeleted;
    /**
     * 是否展示 0->不展示 ，1->展示
     */
    private Integer isShow;
    /**
     * 文章id
     *
     */
    private Integer textId;
    /**
     * 分类名称
     */
    private String categoryName;

    /**
     * 分类id
     */
    private Integer categoryId;

    /**
     * 图片URL
     */
    private String imgUrl;
    /**
     * 发布日期
     */
    private Date createTime;
    /**
     * 更新日期
     */
    private Date updateTime;

    /**
     * 文章内容
     */
    private String text;

    /**
     * 字符显示
     */
    private String createTimeStr;

    /**
     * 审核状态
     */
    private Integer isCheck;

    /**
     * 编辑id
     */
    private Integer editorId;

    /**
     * admin->0,user->1
     */
    private Integer role;

    public Article(Integer id, String title, String author, Integer isDeleted, Integer isShow, Integer textId, String categoryName, Integer categoryId, String imgUrl, Date createTime, Date updateTime, String text) {
        this.id = id;
        this.title = title;
        this.author = author;
        this.isDeleted = isDeleted;
        this.isShow = isShow;
        this.textId = textId;
        this.categoryName = categoryName;
        this.categoryId = categoryId;
        this.imgUrl = imgUrl;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.text = text;
    }



    public Article() {
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Article{");
        sb.append("id=").append(id);
        sb.append(", title='").append(title).append('\'');
        sb.append(", author='").append(author).append('\'');
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", isShow=").append(isShow);
        sb.append(", textId=").append(textId);
        sb.append(", categoryName='").append(categoryName).append('\'');
        sb.append(", categoryId=").append(categoryId);
        sb.append(", imgUrl='").append(imgUrl).append('\'');
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", text='").append(text).append('\'');
        sb.append(", createTimeStr='").append(createTimeStr).append('\'');
        sb.append(", isCheck=").append(isCheck);
        sb.append(", editorId=").append(editorId);
        sb.append(", role=").append(role);
        sb.append('}');
        return sb.toString();
    }

    public Article(Integer id, String title, String author, Integer isDeleted, Integer isShow, Integer textId, String categoryName, Integer categoryId, String imgUrl, Date createTime, Date updateTime, String text, String createTimeStr, Integer isCheck, Integer editorId, Integer role) {
        this.id = id;
        this.title = title;
        this.author = author;
        this.isDeleted = isDeleted;
        this.isShow = isShow;
        this.textId = textId;
        this.categoryName = categoryName;
        this.categoryId = categoryId;
        this.imgUrl = imgUrl;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.text = text;
        this.createTimeStr = createTimeStr;
        this.isCheck = isCheck;
        this.editorId = editorId;
        this.role = role;
    }

    public Integer getIsCheck() {
        return isCheck;
    }

    public void setIsCheck(Integer isCheck) {
        this.isCheck = isCheck;
    }

    public Integer getEditorId() {
        return editorId;
    }

    public void setEditorId(Integer editorId) {
        this.editorId = editorId;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getIsShow() {
        return isShow;
    }

    public void setIsShow(Integer isShow) {
        this.isShow = isShow;
    }

    public Integer getTextId() {
        return textId;
    }

    public void setTextId(Integer textId) {
        this.textId = textId;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getCreateTimeStr() {
        return createTimeStr;
    }

    public void setCreateTimeStr(String createTimeStr) {
        this.createTimeStr = createTimeStr;
    }
}
